package com.code.generator.model;

import com.alibaba.druid.pool.DruidDataSource;
import com.code.generator.model.TableInfo;
import com.code.util.StringUtils;

import java.io.File;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import org.apache.commons.io.FilenameUtils;

public class GeneratorConfiguration implements Serializable {
	private static final long serialVersionUID = 5277437913219544223L;
	private String rootProjectDirectory;
    private String projectName;
    private String dbType = "mysql";
    private String databaseName = "jr_online_card";
    private String persistenceType;
    private DruidDataSource druidDataSource;
    private String splitChar = ",";
    private List<TableInfo> selectTableInfoList = new ArrayList<TableInfo>();
    private String resourcePathSrc = "src/main/resources";
    private String classPathSrc = "src/main/java";
    private String webAppRootPathSrc = "src/main/webapp";
    private String basePackage;
    private String tablesInfoSql;
    private String columnDatasSql;
    private String encoding;
    private String dbUrl;
    private String dbUsername;
    private String dbPassword;
    private List<String> excludeTables = new ArrayList<String>();
    private List<String> excludeColumns = new ArrayList<String>();
    private List<String> needSumColumns = new ArrayList<String>();
    private String selectTables;
    private String domainModuleName;
    private boolean generateDomain = true;
    private String daoModuleName;
    private boolean generateSqlMap = true;
    private boolean generateDao = true;
    private String managerModuleName;
    private boolean generateManager = true;
    private String serviceModuleName;
    private boolean generateService = true;
    private String safModuleName;
    private boolean generateSafService = false;
    private String controllerModuleName;
    private String commonModuleName;
    private String isRpcModuleName;
    private String rpcModuleName;
    private String workModuleName;
    private String safApiModuleName;
    private boolean generateController = true;
    private boolean generateCreate = false;
    private boolean generateUpdate = false;
    private boolean generateDelete = false;
    private boolean generateQuery = false;
    private boolean needSharding = false;
    private boolean needInterface = false;
    private boolean onExistsOverride = false;
    private boolean useMysql = true;
    private boolean useOracle = false;
    private boolean useRedis = true;
    private boolean useSafServer = true;
    private boolean useSafClient = true;
    private boolean useRpcModule = true;
    private boolean useIsRpcModule = true;
    private boolean useWorkModule = true;
    private boolean useZookeeper = true;
    private boolean useMQ = true;
    private boolean needBaseUser = true;

    public GeneratorConfiguration() {
    }

    public String getPackagePrefix() {
        return !this.basePackage.endsWith(".")?this.basePackage + ".":this.basePackage;
    }

    public String getDomainPackage() {
        return this.getPackagePrefix() + this.getProjectName() + ".domain";
    }

    public String getDaoPackage() {
        return this.getPackagePrefix() + this.getProjectName() + ".dao";
    }

    public String getBaseDaoPackage() {
        return this.getPackagePrefix() + this.getProjectName() + ".dao.base";
    }

    public String getDaoImplPackage() {
        return this.getPackagePrefix() + this.getProjectName() + ".dao.impl";
    }

    public String getBaseDaoImplPackage() {
        return this.getPackagePrefix() + this.getProjectName() + ".dao.base.impl";
    }

    public String getManagerPackage() {
        return this.getPackagePrefix() + this.getProjectName() + ".manager";
    }

    public String getManagerImplPackage() {
        return this.getPackagePrefix() + this.getProjectName() + ".manager.impl";
    }

    public String getServicePackage() {
        return this.getPackagePrefix() + this.getProjectName() + ".service";
    }

    public String getSafServicePackage() {
        return this.getPackagePrefix() + this.getProjectName() + ".saf";
    }

    public String getServiceImplPackage() {
        return this.getPackagePrefix() + this.getProjectName() + ".service.impl";
    }

    public String getControllerPackage() {
        return this.getPackagePrefix() + this.getProjectName() + ".web.controller";
    }

    public String getCommonPackage() {
        return this.getPackagePrefix() + this.getProjectName() + ".common";
    }

    public String getBaseCommonEntityPackage() {
        return this.getBasePackage() + "." + this.getProjectName() + ".common.entity";
    }

    public String getIsRpcPackage() {
        return this.getBasePackage() + "." + this.getProjectName() + ".isrpc";
    }

    public String getRpcPackage() {
        return this.getBasePackage() + "." + this.getProjectName() + ".rpc";
    }

    public String getWorkPackage() {
        return this.getBasePackage() + "." + this.getProjectName() + ".web.worker";
    }

    public String getSafApiPackage() {
        return this.getBasePackage() + "." + this.getProjectName() + ".saf.api";
    }

    public String getDomainPath() {
        String domainPath = FilenameUtils.concat(this.getRootProjectDirectory(), this.getDomainModuleName());
        domainPath = FilenameUtils.concat(domainPath, this.getClassPathSrc());
        domainPath = FilenameUtils.concat(domainPath, this.getDomainPackage().replace(".", File.separator));
        return domainPath;
    }

    public String getIsRpcPath() {
        String isRpcPath = FilenameUtils.concat(this.getRootProjectDirectory(), this.getIsRpcModuleName());
        isRpcPath = FilenameUtils.concat(isRpcPath, this.getClassPathSrc());
        isRpcPath = FilenameUtils.concat(isRpcPath, this.getIsRpcPackage().replace(".", File.separator));
        return isRpcPath;
    }

    public String getRpcPath() {
        String rpcPath = FilenameUtils.concat(this.getRootProjectDirectory(), this.getRpcModuleName());
        rpcPath = FilenameUtils.concat(rpcPath, this.getClassPathSrc());
        rpcPath = FilenameUtils.concat(rpcPath, this.getRpcPackage().replace(".", File.separator));
        return rpcPath;
    }

    public String getWorkPath() {
        String workPath = FilenameUtils.concat(this.getRootProjectDirectory(), this.getWorkModuleName());
        workPath = FilenameUtils.concat(workPath, this.getClassPathSrc());
        workPath = FilenameUtils.concat(workPath, this.getWorkPackage().replace(".", File.separator));
        return workPath;
    }

    public String getSafApiPath() {
        String safApiPath = FilenameUtils.concat(this.getRootProjectDirectory(), this.getSafApiModuleName());
        safApiPath = FilenameUtils.concat(safApiPath, this.getClassPathSrc());
        safApiPath = FilenameUtils.concat(safApiPath, this.getSafApiPackage().replace(".", File.separator));
        return safApiPath;
    }

    public String getSqlMapperPath() {
        String sqlMapperPath = this.getSqlMapperConfigPath();
        sqlMapperPath = FilenameUtils.concat(sqlMapperPath, "sqlMap");
        return sqlMapperPath;
    }

    public String getSqlMapperConfigPath() {
        String sqlMapperPath = FilenameUtils.concat(this.getRootProjectDirectory(), this.getDaoModuleName());
        sqlMapperPath = FilenameUtils.concat(sqlMapperPath, this.getResourcePathSrc());
        return sqlMapperPath;
    }

    public String getDaoPath() {
        String daoPath = FilenameUtils.concat(this.getRootProjectDirectory(), this.getDaoModuleName());
        daoPath = FilenameUtils.concat(daoPath, this.getClassPathSrc());
        daoPath = FilenameUtils.concat(daoPath, this.getDaoPackage().replace(".", File.separator));
        return daoPath;
    }

    public String getBaseDaoPath() {
        String daoPath = FilenameUtils.concat(this.getRootProjectDirectory(), this.getDaoModuleName());
        daoPath = FilenameUtils.concat(daoPath, this.getClassPathSrc());
        daoPath = FilenameUtils.concat(daoPath, this.getBaseDaoPackage().replace(".", File.separator));
        return daoPath;
    }

    public String getDaoImplPath() {
        String daoPath = FilenameUtils.concat(this.getRootProjectDirectory(), this.getDaoModuleName());
        daoPath = FilenameUtils.concat(daoPath, this.getClassPathSrc());
        daoPath = FilenameUtils.concat(daoPath, this.getDaoImplPackage().replace(".", File.separator));
        return daoPath;
    }

    public String getBaseDaoImplPath() {
        String daoPath = FilenameUtils.concat(this.getRootProjectDirectory(), this.getDaoModuleName());
        daoPath = FilenameUtils.concat(daoPath, this.getClassPathSrc());
        daoPath = FilenameUtils.concat(daoPath, this.getBaseDaoImplPackage().replace(".", File.separator));
        return daoPath;
    }

    public String getManagerPath() {
        String managerPath = FilenameUtils.concat(this.getRootProjectDirectory(), this.getManagerModuleName());
        managerPath = FilenameUtils.concat(managerPath, this.getClassPathSrc());
        managerPath = FilenameUtils.concat(managerPath, this.getManagerPackage().replace(".", File.separator));
        return managerPath;
    }

    public String getManagerImplPath() {
        String managerPath = FilenameUtils.concat(this.getRootProjectDirectory(), this.getManagerModuleName());
        managerPath = FilenameUtils.concat(managerPath, this.getClassPathSrc());
        managerPath = FilenameUtils.concat(managerPath, this.getManagerImplPackage().replace(".", File.separator));
        return managerPath;
    }

    public String getServicePath() {
        String servicePath = FilenameUtils.concat(this.getRootProjectDirectory(), this.getServiceModuleName());
        servicePath = FilenameUtils.concat(servicePath, this.getClassPathSrc());
        servicePath = FilenameUtils.concat(servicePath, this.getServicePackage().replace(".", File.separator));
        return servicePath;
    }

    public String getSafServicePath() {
        String safServicePath = FilenameUtils.concat(this.getRootProjectDirectory(), this.getSafModuleName());
        safServicePath = FilenameUtils.concat(safServicePath, this.getClassPathSrc());
        safServicePath = FilenameUtils.concat(safServicePath, this.getSafServicePackage().replace(".", File.separator));
        return safServicePath;
    }

    public String getServiceImplPath() {
        String servicePath = FilenameUtils.concat(this.getRootProjectDirectory(), this.getServiceModuleName());
        servicePath = FilenameUtils.concat(servicePath, this.getClassPathSrc());
        servicePath = FilenameUtils.concat(servicePath, this.getServiceImplPackage().replace(".", File.separator));
        return servicePath;
    }

    public String getControllerPath() {
        String controllerPath = FilenameUtils.concat(this.getRootProjectDirectory(), this.getControllerModuleName());
        controllerPath = FilenameUtils.concat(controllerPath, this.getClassPathSrc());
        controllerPath = FilenameUtils.concat(controllerPath, this.getControllerPackage().replace(".", File.separator));
        return controllerPath;
    }

    public String getVmPath() {
        String vmPath = FilenameUtils.concat(this.getRootProjectDirectory(), this.getControllerModuleName());
        vmPath = FilenameUtils.concat(vmPath, this.getWebAppRootPathSrc());
        vmPath = FilenameUtils.concat(vmPath, "WEB-INF" + File.separator + "vm");
        return vmPath;
    }

    public String getCommonPath() {
        String commonPath = FilenameUtils.concat(this.getRootProjectDirectory(), this.getCommonModuleName());
        commonPath = FilenameUtils.concat(commonPath, this.getClassPathSrc());
        commonPath = FilenameUtils.concat(commonPath, this.getCommonPackage().replace(".", File.separator));
        return commonPath;
    }

    public String getBaseCommonEntityPath() {
        String commonPath = FilenameUtils.concat(this.getRootProjectDirectory(), this.getCommonModuleName());
        commonPath = FilenameUtils.concat(commonPath, this.getClassPathSrc());
        commonPath = FilenameUtils.concat(commonPath, this.getBaseCommonEntityPackage().replace(".", File.separator));
        return commonPath;
    }

    public String getRootProjectDirectory() {
        return this.rootProjectDirectory;
    }

    public void setRootProjectDirectory(String rootProjectDirectory) {
        this.rootProjectDirectory = rootProjectDirectory;
    }

    public String getBasePackage() {
        return this.basePackage;
    }

    public void setBasePackage(String basePackage) {
        this.basePackage = basePackage;
    }

    public String getEncoding() {
        return this.encoding;
    }

    public void setEncoding(String encoding) {
        this.encoding = encoding;
    }

    public String getDbUrl() {
        return this.dbUrl;
    }

    public void setDbUrl(String dbUrl) {
        this.dbUrl = dbUrl;
    }

    public String getDbUsername() {
        return this.dbUsername;
    }

    public void setDbUsername(String dbUsername) {
        this.dbUsername = dbUsername;
    }

    public String getDbPassword() {
        return this.dbPassword;
    }

    public void setDbPassword(String dbPassword) {
        this.dbPassword = dbPassword;
    }

    public List<String> getExcludeTables() {
        return this.excludeTables;
    }

    public void setExcludeTables(List<String> excludeTables) {
        this.excludeTables = excludeTables;
    }

    public String getDomainModuleName() {
        if(StringUtils.isNotBlank(this.projectName)) {
            this.domainModuleName = this.projectName + "-domain";
        }

        return this.domainModuleName;
    }

    public void setDomainModuleName(String domainModuleName) {
        this.domainModuleName = domainModuleName;
    }

    public boolean isGenerateDomain() {
        return this.generateDomain;
    }

    public void setGenerateDomain(boolean generateDomain) {
        this.generateDomain = generateDomain;
    }

    public String getDaoModuleName() {
        if(StringUtils.isNotBlank(this.projectName)) {
            this.daoModuleName = this.projectName + "-dao";
        }

        return this.daoModuleName;
    }

    public void setDaoModuleName(String daoModuleName) {
        this.daoModuleName = daoModuleName;
    }

    public boolean isGenerateSqlMap() {
        return this.generateSqlMap;
    }

    public void setGenerateSqlMap(boolean generateSqlMap) {
        this.generateSqlMap = generateSqlMap;
    }

    public boolean isGenerateDao() {
        return this.generateDao;
    }

    public void setGenerateDao(boolean generateDao) {
        this.generateDao = generateDao;
    }

    public String getManagerModuleName() {
        if(StringUtils.isNotBlank(this.projectName)) {
            this.managerModuleName = this.projectName + "-manager";
        }

        return this.managerModuleName;
    }

    public void setManagerModuleName(String managerModuleName) {
        this.managerModuleName = managerModuleName;
    }

    public boolean isGenerateManager() {
        return this.generateManager;
    }

    public void setGenerateManager(boolean generateManager) {
        this.generateManager = generateManager;
    }

    public String getServiceModuleName() {
        if(StringUtils.isNotBlank(this.projectName)) {
            this.serviceModuleName = this.projectName + "-service";
        }

        return this.serviceModuleName;
    }

    public void setServiceModuleName(String serviceModuleName) {
        this.serviceModuleName = serviceModuleName;
    }

    public boolean isGenerateService() {
        return this.generateService;
    }

    public void setGenerateService(boolean generateService) {
        this.generateService = generateService;
    }

    public String getSafModuleName() {
        if(StringUtils.isNotBlank(this.projectName)) {
            this.safModuleName = this.projectName + "-saf";
        }

        return this.safModuleName;
    }

    public void setSafModuleName(String safModuleName) {
        this.safModuleName = safModuleName;
    }

    public boolean isGenerateSafService() {
        return this.generateSafService;
    }

    public void setGenerateSafService(boolean generateSafService) {
        this.generateSafService = generateSafService;
    }

    public String getControllerModuleName() {
        if(StringUtils.isNotBlank(this.projectName)) {
            this.controllerModuleName = this.projectName + "-web";
        }

        return this.controllerModuleName;
    }

    public void setControllerModuleName(String controllerModuleName) {
        this.controllerModuleName = controllerModuleName;
    }

    public boolean isGenerateController() {
        return this.generateController;
    }

    public void setGenerateController(boolean generateController) {
        this.generateController = generateController;
    }

    public boolean isGenerateCreate() {
        return this.generateCreate;
    }

    public void setGenerateCreate(boolean generateCreate) {
        this.generateCreate = generateCreate;
    }

    public boolean isGenerateUpdate() {
        return this.generateUpdate;
    }

    public void setGenerateUpdate(boolean generateUpdate) {
        this.generateUpdate = generateUpdate;
    }

    public boolean isGenerateDelete() {
        return this.generateDelete;
    }

    public void setGenerateDelete(boolean generateDelete) {
        this.generateDelete = generateDelete;
    }

    public boolean isGenerateQuery() {
        return this.generateQuery;
    }

    public void setGenerateQuery(boolean generateQuery) {
        this.generateQuery = generateQuery;
    }

    public boolean isNeedSharding() {
        return this.needSharding;
    }

    public void setNeedSharding(boolean needSharding) {
        this.needSharding = needSharding;
    }

    public boolean isNeedInterface() {
        return this.needInterface;
    }

    public void setNeedInterface(boolean needInterface) {
        this.needInterface = needInterface;
    }

    public boolean isOnExistsOverride() {
        return this.onExistsOverride;
    }

    public void setOnExistsOverride(boolean onExistsOverride) {
        this.onExistsOverride = onExistsOverride;
    }

    public DruidDataSource getDruidDataSource() {
        return this.druidDataSource;
    }

    public void setDruidDataSource(DruidDataSource druidDataSource) {
        this.druidDataSource = druidDataSource;
    }

    public String getSplitChar() {
        return this.splitChar;
    }

    public void setSplitChar(String splitChar) {
        this.splitChar = splitChar;
    }

    public List<TableInfo> getSelectTableInfoList() {
        return this.selectTableInfoList;
    }

    public TableInfo getSelectTableInfo(String tableName) {
        if(this.selectTableInfoList != null) {
            Iterator var3 = this.selectTableInfoList.iterator();

            while(var3.hasNext()) {
                TableInfo tableInfo = (TableInfo)var3.next();
                if(tableInfo.getTableName().equals(tableName)) {
                    return tableInfo;
                }
            }
        }

        return null;
    }

    public void setSelectTableInfoList(List<TableInfo> selectTableInfoList) {
        this.selectTableInfoList = selectTableInfoList;
    }

    public String getResourcePathSrc() {
        return this.resourcePathSrc;
    }

    public void setResourcePathSrc(String resourcePathSrc) {
        this.resourcePathSrc = resourcePathSrc;
    }

    public String getClassPathSrc() {
        return this.classPathSrc;
    }

    public void setClassPathSrc(String classPathSrc) {
        this.classPathSrc = classPathSrc;
    }

    public String getTablesInfoSql() {
        if(StringUtils.isBlank(this.tablesInfoSql)) {
            if(this.dbUrl.indexOf("mysql") < 0 && this.dbUrl.indexOf("MYSQL") < 0) {
                if(this.dbUrl.indexOf("oracle") >= 0 || this.dbUrl.indexOf("ORACLE") >= 0) {
                    this.tablesInfoSql = "SELECT T.TABLE_NAME ,T.COMMENTS FROM USER_TAB_COMMENTS  T ORDER BY T.TABLE_NAME";
                }
            } else {
                this.tablesInfoSql = "SELECT T.TABLE_NAME ,T.TABLE_COMMENT FROM INFORMATION_SCHEMA.TABLES  T  WHERE TABLE_SCHEMA = \'@TABLE_SCHEMA\' ORDER BY T.TABLE_NAME";
            }
        }

        return this.tablesInfoSql;
    }

    public void setTablesInfoSql(String tablesInfoSql) {
        this.tablesInfoSql = tablesInfoSql;
    }

    public String getColumnDatasSql() {
        if(StringUtils.isBlank(this.columnDatasSql)) {
            if(this.dbUrl.indexOf("mysql") < 0 && this.dbUrl.indexOf("MYSQL") < 0) {
                if(this.dbUrl.indexOf("oracle") >= 0 || this.dbUrl.indexOf("ORACLE") >= 0) {
                    this.columnDatasSql = "SELECT A.COLUMN_NAME, B.DATA_TYPE, A.COMMENTS, B.DATA_PRECISION, B.DATA_SCALE, B.CHAR_LENGTH, B.NULLABLE, CASE WHEN C.COLUMN_NAME IS NOT NULL THEN \'PRI\' ELSE \'\' END PRI,\' \' AUTO_INCREMENT FROM USER_COL_COMMENTS A LEFT JOIN USER_TAB_COLUMNS B ON A.TABLE_NAME = B.TABLE_NAME AND A.COLUMN_NAME = B.COLUMN_NAME LEFT JOIN ( SELECT P.TABLE_NAME, P.COLUMN_NAME FROM USER_CONS_COLUMNS P WHERE EXISTS ( SELECT \t1 FROM \tUSER_CONSTRAINTS T WHERE \tT.CONSTRAINT_TYPE = \'P\' AND P.CONSTRAINT_NAME = T.CONSTRAINT_NAME ) ) C ON A.TABLE_NAME = C.TABLE_NAME AND A.COLUMN_NAME = C.COLUMN_NAME WHERE A.TABLE_NAME = \'@TABLE_NAME\' ORDER BY B.COLUMN_ID";
                }
            } else {
                this.columnDatasSql = "SELECT COLUMN_NAME ,DATA_TYPE,COLUMN_COMMENT,NUMERIC_PRECISION,NUMERIC_SCALE,CHARACTER_MAXIMUM_LENGTH,IS_NULLABLE NULLABLE,COLUMN_KEY,EXTRA FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME =  \'@TABLE_NAME\' AND TABLE_SCHEMA =  \'@TABLE_SCHEMA\' ORDER BY ORDINAL_POSITION";
            }
        }

        return this.columnDatasSql;
    }

    public void setColumnDatasSql(String columnDatasSql) {
        this.columnDatasSql = columnDatasSql;
    }

    public List<String> getExcludeColumns() {
        return this.excludeColumns;
    }

    public void setExcludeColumns(List<String> excludeColumns) {
        this.excludeColumns = excludeColumns;
    }

    public List<String> getNeedSumColumns() {
        return this.needSumColumns;
    }

    public void setNeedSumColumns(List<String> needSumColumns) {
        this.needSumColumns = needSumColumns;
    }

    public String getProjectName() {
        return this.projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getDbType() {
        return this.dbType;
    }

    public void setDbType(String dbType) {
        this.dbType = dbType;
    }

    public String getDatabaseName() {
        return this.databaseName;
    }

    public void setDatabaseName(String databaseName) {
        this.databaseName = databaseName;
    }

    public String getPersistenceType() {
        return this.persistenceType;
    }

    public void setPersistenceType(String persistenceType) {
        this.persistenceType = persistenceType;
    }

    public String getSelectTables() {
        return this.selectTables;
    }

    public void setSelectTables(String selectTables) {
        this.selectTables = selectTables;
    }

    public String getCommonModuleName() {
        if(StringUtils.isNotBlank(this.projectName)) {
            this.commonModuleName = this.projectName + "-common";
        }

        return this.commonModuleName;
    }

    public void setCommonModuleName(String commonModuleName) {
        this.commonModuleName = commonModuleName;
    }

    public boolean isUseMysql() {
        return this.useMysql;
    }

    public void setUseMysql(boolean useMysql) {
        this.useMysql = useMysql;
    }

    public boolean isUseOracle() {
        return this.useOracle;
    }

    public void setUseOracle(boolean useOracle) {
        this.useOracle = useOracle;
    }

    public boolean isUseRedis() {
        return this.useRedis;
    }

    public void setUseRedis(boolean useRedis) {
        this.useRedis = useRedis;
    }

    public boolean isUseZookeeper() {
        return this.useZookeeper;
    }

    public void setUseZookeeper(boolean useZookeeper) {
        this.useZookeeper = useZookeeper;
    }

    public boolean isUseMQ() {
        return this.useMQ;
    }

    public void setUseMQ(boolean useMQ) {
        this.useMQ = useMQ;
    }

    public boolean isNeedBaseUser() {
        return this.needBaseUser;
    }

    public void setNeedBaseUser(boolean needBaseUser) {
        this.needBaseUser = needBaseUser;
    }

    public boolean isUseRpcModule() {
        return this.useRpcModule;
    }

    public void setUseRpcModule(boolean useRpcModule) {
        this.useRpcModule = useRpcModule;
    }

    public boolean isUseIsRpcModule() {
        return this.useIsRpcModule;
    }

    public void setUseIsRpcModule(boolean useIsRpcModule) {
        this.useIsRpcModule = useIsRpcModule;
    }

    public boolean isUseWorkModule() {
        return this.useWorkModule;
    }

    public void setUseWorkModule(boolean useWorkModule) {
        this.useWorkModule = useWorkModule;
    }

    public boolean isUseSafServer() {
        return this.useSafServer;
    }

    public void setUseSafServer(boolean useSafServer) {
        this.useSafServer = useSafServer;
    }

    public boolean isUseSafClient() {
        return this.useSafClient;
    }

    public void setUseSafClient(boolean useSafClient) {
        this.useSafClient = useSafClient;
    }

    public String getIsRpcModuleName() {
        if(StringUtils.isNotBlank(this.projectName)) {
            this.isRpcModuleName = this.projectName + "-isrpc";
        }

        return this.isRpcModuleName;
    }

    public void setIsRpcModuleName(String isRpcModuleName) {
        this.isRpcModuleName = isRpcModuleName;
    }

    public String getRpcModuleName() {
        if(StringUtils.isNotBlank(this.projectName)) {
            this.rpcModuleName = this.projectName + "-rpc";
        }

        return this.rpcModuleName;
    }

    public void setRpcModuleName(String rpcModuleName) {
        this.rpcModuleName = rpcModuleName;
    }

    public String getWorkModuleName() {
        if(StringUtils.isNotBlank(this.projectName)) {
            this.workModuleName = this.projectName + "-work";
        }

        return this.workModuleName;
    }

    public void setWorkModuleName(String workModuleName) {
        this.workModuleName = workModuleName;
    }

    public String getSafApiModuleName() {
        if(StringUtils.isNotBlank(this.projectName)) {
            this.safApiModuleName = this.projectName + "-saf-api";
        }

        return this.safApiModuleName;
    }

    public void setSafApiModuleName(String safApiModuleName) {
        this.safApiModuleName = safApiModuleName;
    }

    public String getWebAppRootPathSrc() {
        return this.webAppRootPathSrc;
    }

    public void setWebAppRootPathSrc(String webAppRootPathSrc) {
        this.webAppRootPathSrc = webAppRootPathSrc;
    }
}
